{% extends "blog/base.html" %}

{% block title  %}My blog{% endblock %}
{% block content %}

  {% include "pagination.html" with page=posts %}

  <h1>My Blog</h1>

  {% for post in posts %}
    <h2>
      <a href="{{ post.get_absolute_url }}">{{ post.title }}</a>
    </h2>
    <p class="date">
      Published {{ post.publish }} by {{ post.author }}
    </p>
    {{ post.body|truncatewords:30|linebreaks }}
  {% endfor %}
{% endblock %}

